﻿#pragma once
#include "ClientProtocol.h"
#include "MySocket.h"

class GameNet
{
	GameNet();
public:
	static GameNet* getInstance();

	void connect(const char* ip, u_short port);
	void close();
    int onAsyncRecv();
    void onAsyncSend();

	void dispatchPackets();

    ClientProtocol* getProtocol() { return &m_protocol; }

private:
	MySocket m_mySocket;
    ClientProtocol m_protocol;
};
